namespace AdvancedInspector
{
	public class DescriptorPair
	{
		private object value;

		private DescriptorAttribute descriptor;

		public object Value
		{
			get
			{
				return value;
			}
		}

		public DescriptorAttribute Descriptor
		{
			get
			{
				return descriptor;
			}
		}

		public DescriptorPair(object value, DescriptorAttribute descriptor)
		{
			this.value = value;
			this.descriptor = descriptor;
		}

		public DescriptorPair(object value, string name)
			: this(value, new DescriptorAttribute(name, string.Empty))
		{
		}

		public DescriptorPair(object value, string name, string description)
			: this(value, new DescriptorAttribute(name, description))
		{
		}

		public override bool Equals(object obj)
		{
			DescriptorPair descriptorPair = obj as DescriptorPair;
			if (descriptorPair == null)
			{
				return false;
			}
			return Value.Equals(descriptorPair.Value);
		}

		public override int GetHashCode()
		{
			return base.GetHashCode();
		}

		public static bool operator ==(DescriptorPair a, DescriptorPair b)
		{
			if (object.ReferenceEquals(a, b))
			{
				return true;
			}
			if ((object)a == null || (object)b == null)
			{
				return false;
			}
			return a.Equals(b);
		}

		public static bool operator !=(DescriptorPair a, DescriptorPair b)
		{
			return !(a == b);
		}
	}
}
